﻿using SignalRApp.Models;
using SignalRApp.Repository;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace SignalRApp.Service
{
    public interface IUserService
    {
        User GetUserById(int id);
    }

    public class UserService : IUserService
    {
        private readonly Repository<User> repository;

        public UserService(Repository<User> repository)
        {
            this.repository = repository;
        }

        public User GetUserById(int id)
        {
            var user = repository.GetById(id);
            return user;
        }
    }
}